package com.zhijian.warehouse.manage.enums;

/**
 * 库存操作
 * @Author 王小宇
 * @Version 1.0.1
 */
public class DoorEnum {
    
    /**
     * 库存操作类型
     */
    public enum DOOR_IN_OUT_TYPE {

        OUT(1, "出"),
        IN(2, "入"),
        UN(0, "未识别"),
        ;
        public int value;
        public String msg;
        
        DOOR_IN_OUT_TYPE(int value, String msg) {
            this.value = value;
            this.msg = msg;
        }
        
        public static DOOR_IN_OUT_TYPE getByValue(int value) {
            DOOR_IN_OUT_TYPE[] flags = DOOR_IN_OUT_TYPE.values();
            for (DOOR_IN_OUT_TYPE flag : flags) {
                if (flag.value == value)
                    return flag;
            }
            return null;
        }
    }
    
    /**
     * 库存操作类型
     */
    public enum OPT_SOURCE {

        WEB(1, "web"),
        APP(2, "app"),
        ;
        public int value;
        public String msg;

        OPT_SOURCE(int value, String msg) {
            this.value = value;
            this.msg = msg;
        }
        
        public static OPT_SOURCE getByValue(int value) {
            OPT_SOURCE[] flags = OPT_SOURCE.values();
            for (OPT_SOURCE flag : flags) {
                if (flag.value == value)
                    return flag;
            }
            return null;
        }
    }
    /**
     * 库存操作类型
     */
    public enum CONNECT_TYPE {
        
        CONNECT(1, "连接"),
        OFF(0, "未连接"),
        ;
        public int value;
        public String msg;
        
        CONNECT_TYPE(int value, String msg) {
            this.value = value;
            this.msg = msg;
        }
        
        public static CONNECT_TYPE getByValue(int value) {
            CONNECT_TYPE[] flags = CONNECT_TYPE.values();
            for (CONNECT_TYPE flag : flags) {
                if (flag.value == value)
                    return flag;
            }
            return null;
        }
    }
}
